/*************************************************
filename	: input_module.h
author		: Stefan lulham
desc		: Contains the base input
*************************************************/
#ifndef D_INPUT_H
#define D_INPUT_H

#include <platform.h>
#include <modules\module.h>
//#include "system_module.h"
#include <modules\input\input_enums.h>

#include <modules\input\input_interface.h>
#if defined (DELGE_PLATFORM_WIN32)
#include <modules\input\win32\win32_input_interface.h>
#endif

//using namespace DelGE::Modules::System;

namespace DelGE
{
	namespace Modules
	{
		namespace Input
		{
			class InputModule : public Module
			{
			private:
				#if defined(DELGE_PLATFORM_WIN32)
				Win32InputInterface* pWin32_Interface;
				#endif

			protected:
				void LoadModule();
				void UnloadModule();
				void HandleMessages();

			public:
				InputModule();
				~InputModule();

				#if defined(DELGE_PLATFORM_WIN32)
				Win32InputInterface* GetInterface_Win32();
				#endif

				/*void SetSystemHandle(SystemModule* pSystem);
				SystemModule* GetSystemHandle();*/

				bool IsKeyUp(KeyCode key);
				bool IsKeyDown(KeyCode key);
				bool IsKeyHit(KeyCode key);
				bool IsKeyPressed(KeyCode key);

				bool IsMouseButtonUp(MouseCode key);
				bool IsMouseButtonDown(MouseCode key);
				bool IsMouseButtonHit(MouseCode key);
				bool IsMouseButtonPressed(MouseCode key);

				int GetMouseX();
				int GetMouseY();
				void SetMousePosition(int iMouseX, int iMouseY);

				void Update();
			};
		}
	}
}

#endif